DXL Export to word

I have need to export my requirements from doors to word using the following convention:
Doors Level 1 - Word Heading 1
Doors Level 2 - Word Heading 2
Doors Level 3 - Word Heading 3
Doors Level 4 - Word Heading 4
Doors Level 5 - Word Normal text
Doors Level 6 - Word Bulleted text at same level as Normal test
Doors Level 7 - Word Bulleted text one level down compared to level 6
Doors Level 8 - Word bulleted text one level down compared to level 7

I also want to put the absolute ID before the actual requirement.

Can someone help me with a dxl script.
SystemAdmin - Thu May 06 23:07:26 EDT 2010

Re: DXL Export to word
SystemAdmin - Fri May 07 00:13:31 EDT 2010

You may not have to write any DXL at all.

The built-in export to MSWord function has an option that will let you map DOORS object levels to MSWord styles

For example, map a Level 1 Object Heading in DOORS to the "Heading 1" style in MSWord. Once you have done this mapping, you can save it for later reuse.

Open a DOORS module - select File > Export > Microsoft Office > Word

Select the "Advanced" tab

Select the "Allow style mapping" option

Select the "Export" button - this will raise a window where you map DOORS object levels to MSWord styles. The list of MSWord styles is based on whether you have selected the MSWord "Normal" template or a specific MSWord template in the "Advanced" tab.

You will need to use DOORS Help to work out what all of the other options in the "General" and "Advanced" tabs can do for you.


Paul Miller

Re: DXL Export to word
SystemAdmin - Fri May 07 00:52:02 EDT 2010

SystemAdmin - Fri May 07 00:13:31 EDT 2010
You may not have to write any DXL at all.

The built-in export to MSWord function has an option that will let you map DOORS object levels to MSWord styles

For example, map a Level 1 Object Heading in DOORS to the "Heading 1" style in MSWord. Once you have done this mapping, you can save it for later reuse.

Open a DOORS module - select File > Export > Microsoft Office > Word

Select the "Advanced" tab

Select the "Allow style mapping" option

Select the "Export" button - this will raise a window where you map DOORS object levels to MSWord styles. The list of MSWord styles is based on whether you have selected the MSWord "Normal" template or a specific MSWord template in the "Advanced" tab.

You will need to use DOORS Help to work out what all of the other options in the "General" and "Advanced" tabs can do for you.


Paul Miller

Thanks Paul,

I tried it and it worked as you said. The problem is that it has a strucure that is not suitable for my report. What I need is

Heading L1
Heading L2
Heading L3
Heding L4
ID Object Text
ID Object Text
ID <Bullet L1> Object Text
ID <Bullet L2> Object Text
ID <Bullet L3> Object Text

How do I do this.

Re: DXL Export to word
SystemAdmin - Fri May 07 01:43:40 EDT 2010

SystemAdmin - Fri May 07 00:52:02 EDT 2010
Thanks Paul,

I tried it and it worked as you said. The problem is that it has a strucure that is not suitable for my report. What I need is

Heading L1
Heading L2
Heading L3
Heding L4
ID Object Text
ID Object Text
ID <Bullet L1> Object Text
ID <Bullet L2> Object Text
ID <Bullet L3> Object Text

How do I do this.

You're asking for a very specific format where the DOORS UID only appears next to objects that are not headings - this will require a combination of what I described in my previous post and the creation of a special view that only displays what you want to export to MSWord. This special view will require at least two columns.

Column 1 A DXL layout column that only displays a the UID if the object is not a heading.

Column 2 The usual Main column which displays all of the headings and text.

The code for column 1 is very simple:

if (obj."Object Heading" "" == "") display "[" identifier(obj) "]"

 


Save the View.

Export this to MSWord using the built in exporter but select the "Table" layout option in the "General" tab. Select the "Allow style mapping" option and define your style map as discussed in my previous post.

When this is exported to MSWord - it will be formatted as a MSWord table - from this point forward, take advantage of MSWords rich features to format the table to suit. If you have really fussy users that don't like tables - consider just removing the table borders or convert the table to text and the UID's will appear in front of the text. Once it's in MSWord - use MSWord to make it look nice, don't waste time trying to create a mega DXL script to export and make it look nice in MSWord. Consider creating a post export macro in MSWord that cleans up the table.

Paul Miller

 

Re: DXL Export to word
SystemAdmin - Fri May 07 02:45:35 EDT 2010

SystemAdmin - Fri May 07 01:43:40 EDT 2010

You're asking for a very specific format where the DOORS UID only appears next to objects that are not headings - this will require a combination of what I described in my previous post and the creation of a special view that only displays what you want to export to MSWord. This special view will require at least two columns.

Column 1 A DXL layout column that only displays a the UID if the object is not a heading.

Column 2 The usual Main column which displays all of the headings and text.

The code for column 1 is very simple:

if (obj."Object Heading" "" == "") display "[" identifier(obj) "]"

 


Save the View.

Export this to MSWord using the built in exporter but select the "Table" layout option in the "General" tab. Select the "Allow style mapping" option and define your style map as discussed in my previous post.

When this is exported to MSWord - it will be formatted as a MSWord table - from this point forward, take advantage of MSWords rich features to format the table to suit. If you have really fussy users that don't like tables - consider just removing the table borders or convert the table to text and the UID's will appear in front of the text. Once it's in MSWord - use MSWord to make it look nice, don't waste time trying to create a mega DXL script to export and make it look nice in MSWord. Consider creating a post export macro in MSWord that cleans up the table.

Paul Miller

 

Thanks Paul. I will give it a try and come back if I have issues.

Re: DXL Export to word
Zetareticuli - Mon May 10 08:01:22 EDT 2010

SystemAdmin - Fri May 07 02:45:35 EDT 2010
Thanks Paul. I will give it a try and come back if I have issues.

Another option might be to use Word's find/replace functionality to remove tags from headings you don't want them to be used on. It would look something like this:
find box = (ID : 123)(*^13)
replace box = \2
find formatting = style you want to remove the tag from

With wild cards turned on this will find a tag preceding a specific style and remove the tag throughout the whole document. You'll need to do a find/replace for each style where you don't want the ID tag to be present. If this is something that needs to be done frequently, you can capture the commands in a macro. Where I work we have an extensive "post processing macro" which we run on our raw DOORS exports to format the data in our standard document format.